package com.apps.ftapp.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lyli on 2017/10/10.
 */

public class LessonBean {

    private String id;
    private String name;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public static List<LessonBean> traCategory(List<LessonTypeModel.InfoBean.LeibieBean> dataList) {

        List<LessonBean> resultList = new ArrayList<>();
        if (null != dataList && dataList.size() > 0) {
            for (LessonTypeModel.InfoBean.LeibieBean bean : dataList) {
                LessonBean lessonBean = new LessonBean();
                lessonBean.setId(bean.getId());
                lessonBean.setName(bean.getName());
                resultList.add(lessonBean);
            }
        }
        return resultList;

    }


    public static List<LessonBean> traXk(List<LessonTypeModel.InfoBean.ZpxuekeBean> dataList) {

        List<LessonBean> resultList = new ArrayList<>();
        if (null != dataList && dataList.size() > 0) {
            for (LessonTypeModel.InfoBean.ZpxuekeBean bean : dataList) {
                LessonBean lessonBean = new LessonBean();
                lessonBean.setId(bean.getId());
                lessonBean.setName(bean.getName());
                resultList.add(lessonBean);
            }
        }
        return resultList;

    }


    public static List<LessonBean> traXd(List<LessonTypeModel.InfoBean.XueduanBean> dataList) {

        List<LessonBean> resultList = new ArrayList<>();
        if (null != dataList && dataList.size() > 0) {
            for (LessonTypeModel.InfoBean.XueduanBean bean : dataList) {
                LessonBean lessonBean = new LessonBean();
                lessonBean.setId(bean.getId());
                lessonBean.setName(bean.getName());
                resultList.add(lessonBean);
            }
        }
        return resultList;

    }


    public static List<LessonBean> traOrder(List<FenXiangLieBiaoModel.OrderbyarrBean> dataList) {

        List<LessonBean> resultList = new ArrayList<>();
        if (null != dataList && dataList.size() > 0) {
            for (FenXiangLieBiaoModel.OrderbyarrBean bean : dataList) {
                LessonBean lessonBean = new LessonBean();
                lessonBean.setId(bean.getOrderby());
                lessonBean.setName(bean.getName());
                resultList.add(lessonBean);
            }
        }
        return resultList;

    }


    public static List<LessonBean> traFenlei(List<FenXiangLieBiaoModel.CategoryIdarrBean> dataList) {

        List<LessonBean> resultList = new ArrayList<>();
        if (null != dataList && dataList.size() > 0) {
            for (FenXiangLieBiaoModel.CategoryIdarrBean bean : dataList) {
                LessonBean lessonBean = new LessonBean();
                lessonBean.setId(bean.getCategoryId());
                lessonBean.setName(bean.getName());
                resultList.add(lessonBean);
            }
        }
        return resultList;

    }


}
